package com.kingyun.gpsinspection.purificationservice.dao.mapper.jsm;


import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Device;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.DeviceMaintenance;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Employee;

import java.util.List;

public interface DeviceMaintenanceMapper {
    int deleteByPrimaryKey(String maintenanceId);

    int insert(DeviceMaintenance record);

    int insertSelective(DeviceMaintenance record);

    DeviceMaintenance selectByPrimaryKey(String maintenanceId);

    List<DeviceMaintenance> selectByDeviceMaintenanceList(DeviceMaintenance deviceMaintenance);

    int updateByPrimaryKeySelective(DeviceMaintenance record);

    int updateByPrimaryKey(DeviceMaintenance record);

    /**
     * @param deviceMaintenance
     * @return 插入维保周期
     */
    int insertDeviceMaintenance(DeviceMaintenance deviceMaintenance, Employee employee) throws Exception;

    /**
     * 查询维保周期列表 ， 注意排序
     * @param deviceMaintenance
     */
    List<DeviceMaintenance> getDeviceMaintenanceList(DeviceMaintenance deviceMaintenance) throws Exception;

    int delDeviceMaintenances(Device device);

}